<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<script src="http://127.0.0.1/hdwy/wasai/Static/jqurey-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" type="text/css" href="http://127.0.0.1/hdwy/wasai/Static/bootstrap/css/bootstrap.min.css"/>
	<link rel="stylesheet" href="http://127.0.0.1/hdwy/wasai/Application/Admin/View/Public/Css/common.css" />
	<link rel="stylesheet" type="text/css" href="http://127.0.0.1/hdwy/wasai/Static/hdjs/hdjs.css"/>
	<script src="http://127.0.0.1/hdwy/wasai/Static/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
	<style type="text/css">
		body{
			margin-bottom: 100px;
		}
	</style>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<table class="table table-bordered table-hover">
		<tr>
			<th>ID</th>
			<th>商品名称</th>
			<th>价格</th>
			<th>库存</th>
			<th>添加时间</th>
			<th>操作</th>
		</tr>
		<?php foreach ($data as $k=>$v){?>
			<tr class="info">
				<td><?php echo $v['sid'];?></td>
				<td>
					<a href="" target='_blank'><?php echo $v['sname'];?></a>
				</td>
				<td>
					<ul>
						<li>市场价：<del>&yen;<?php echo $v['marketprice'];?></del></li>
						<li>商城价：<span>&yen;<?php echo $v['shopprice'];?></li>
					</ul>
				</td>
				<td>
					库存
				</td>
				<td><?php echo date('Y-m-d H:i:s',$v['time']);?></td>
				<td>
					<a href="<?php echo U('Admin/ShopList/index',array('sid'=>$v['sid'],'tid'=>$v['type_tid']));?>" class="btn btn-success"><i class="icon-th icon-white"></i>货品列表</a>
					<a href="<?php echo U('edit',array('sid'=>$v['sid']));?>" class="btn btn-warning"><i class="icon-pencil icon-white"></i>修改</a>
					<a href="<?php echo U('del',array('sid'=>$v['sid']));?>" class="btn btn-danger"><i class="icon-trash icon-white"></i>删除</a>
				</td>
			</tr>
		<?php }?>
	</table>
	 <script type="text/javascript">
	    	 function modal(sid) {
		        hd_modal({
		            width: 300,//宽度
		            height: 150,//高度
		            title: '确认删除吗？',//标题
		            content: '',//提示信息
		            button: true,//显示按钮
		            button_success: "确定",//确定按钮文字
		            button_cancel: "取消",//关闭按钮文字
		            timeout: 0,//自动关闭时间 0：不自动关闭
		            shade: true,//背景遮罩
		            shadeOpacity: 0.4,//背景透明度
		            success: function () {//点击确定后的事件
						location.href="<?php echo U('Admin/Shop/del');?>" + "&sid=" + sid;
		            },
		            cancel: function () {//点击关闭后的事件
						
		            }
		        });
		    }
	    </script>

	</div>
	</div>
	</div>
</body>
</html>